import React from 'react'
import { getMenuSub } from 'services/utils'
import { Icon } from 'antd'
import Proto from './proto'
import Plan from './plan'
import Setting from './setting'
import Flag from 'config/flag'

const routes = {
  path: '/system-tools',
  name: '系统工具',
  childRoutes: [
    //{ path: 'default', name: 'Home', component: Screen, isIndex: true },
    { 
      path: 'proto', 
      name: '接口测试', 
      component: Proto, 
      flags: Flag['/system-tools/proto']
    },
    { 
      path: 'plan', 
      name: '系统方案', 
      component: Plan, 
      flags: Flag['/system-tools/plan']
    },
    { 
      path: 'setting', 
      name: '系统配置', 
      component: Setting, 
      flags: Flag['/system-tools/setting']
    },
  ]
}

export default routes

export const menuSub = getMenuSub(routes, {
    key:   `system-tools`, 
    //name:  `帐号管理`, 
    icon:  <Icon type="user" />
  })